﻿using System;
using OneMG.Phoenix.Entity;
using OneMG.Phoenix.Respository;
using IBatisNet.DataMapper;
using OneMG.Phoenix.Kernel.IBatisUtil;

namespace OneMG.Phoenix.IBatisRepository
{
    public class AdminUserGroupRepository : BaseIBatisDao,IAdminUserGroup
    {
        public AdminUserGroupRepository()
            : base("yihaoke_newMap.Config")
        {

        }
        public System.Int32 AddAdminUserGroup(EAdminUserGroup entity)
        {
			string stmtId = "AdminUserGroupMap.InsertAdminUserGroup";
			 Object obj = base.SqlMapper.Insert(stmtId, entity);
			 return (System.Int32)obj;
        }
        
		public  EAdminUserGroup GetByAdminUserGroupID (System.Int32 adminUserGroupID)
        {
			string stmtId = "AdminUserGroupMap.SelectByAdminUserGroupID";
			return base.SqlMapper.QueryForObject<EAdminUserGroup>(stmtId, adminUserGroupID);
        }
        
        public  void DeleteByAdminUserGroupID (System.Int32 adminUserGroupID)
        {
			string stmtId = "AdminUserGroupMap.DeleteByAdminUserGroupID";
			base.SqlMapper.Update(stmtId, adminUserGroupID);
        }
        
        public  void UpdateByAdminUserGroupID (EAdminUserGroup entity)
        {
			string stmtId = "AdminUserGroupMap.UpdateByAdminUserGroupID";
			base.SqlMapper.Update(stmtId, entity);
        }

    }
}

